


clear 
set scheme lean2, permanent
global pm = char(177)
set more off

gl date = c(current_date)
if c(os) == "MacOSX" gl user "/Users/`c(username)'"
else if c(os) == "Windows" gl user "C:\Users\\`c(username)'"
else if c(os) == "Unix" gl user "/usr/`c(username)'"
di "$user

set graphics on  
 

global path_data_processed "\data\processed"
global path_output "\data\output"
global path_profforecasters "\data\SPF" // place SPF data into this folder
 
clear all
set more off

cd "$path_profforecasters"

 
 use "SPF.dta", clear
 
replace recession= subinstr(recession, ",", ".", .)
 destring *, replace
 
 cd "$path_output"
drop if recession==0
 
***** I) prior and posterior beliefs about receccsion*****

hist recession, xtitle("Recession Forecasts: Survey of Professional Forecasters (2017 Q2)")  width(1) frac
graph save "SPF.gph", replace
graph export "SPF.pdf", replace




hist recession, xtitle("Recession Expectations: Professional Forecasters")  width(2) frac
graph save "SPF2.gph", replace
graph export "SPF2.pdf", replace





